/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package EJEMPLOSawt;

import java.awt.Button;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.Panel;

/**
 *
 * @author pueblax
 */
public class ejemploawt {
public static void main (String args[]){
    Frame f=new Frame();
FlowLayout flo=new FlowLayout();//acomoda distancia uno en otro de izquierda a derecha
//f.setLayout(new FlowLayout());
f.setLayout(flo);
flo.setHgap(50);//setHgap son pixeseles
flo.setAlignment(FlowLayout.RIGHT);

/*0000000000000
    Button b=new Button("1");
    Button b1=new Button("2");
    Button b2=new Button("3");
    Button b3=new Button("4");
    Button b4=new Button("5");
  */

Panel p=new Panel();



    f.setLayout(new GridLayout(3,3));///pone columna y filas

    Button b1=new Button("1");
    Button b2=new Button("2");
    Button b3=new Button("3");
    Button b4=new Button("4");
    Button b5=new Button("5");
    Button b6=new Button("6");
    Button b7=new Button("7");
    Button b8=new Button("8");
    Button b9=new Button("9");

   
    f.add(b1);
    f.add(b2);
    f.add(b3);
    f.add(b4);
    f.add(p);//agraga panel
    f.add(b6);
    f.add(b7);
    f.add(b8);
    f.add(b9);
p.add(b5); //ingresa boton en el panel

/*  //  f.addBorderLayout.NORTH,b);
    f.add(BorderLayout.SOUTH,b1);
    f.add(BorderLayout.EAST,b2);
    f.add(BorderLayout.WEST,b3);
    f.add(BorderLayout.CENTER,b4);  */







f.setLocation(500, 400);
    f.setVisible(true);
    f.setSize(300, 300);


    //System.exit(0);


}
}
